//
//  LYBaseTableViewController.swift
//  DSDweibo
//
//  Created by Mac on 15/9/8.
//  Copyright © 2015年 FSK. All rights reserved.
//

import UIKit

class LYBaseTableViewController: UITableViewController,visitorViewDelegate {

   let userLogin = true
    // 定义一个属性,保存用户未登录界面
    var visitorView: LYVisitorView?
    
    override func loadView() {
        
        userLogin ? super.loadView() : setupVisitorView()
    }

    private func setupVisitorView()
    {
        let customView = LYVisitorView()
        customView.backgroundColor = UIColor.whiteColor()
        view = customView
        visitorView = customView
        
        
        navigationItem.leftBarButtonItem = UIBarButtonItem(title: "注册", style: UIBarButtonItemStyle.Plain, target: self, action: "registerButtom")
        
        navigationItem.rightBarButtonItem = UIBarButtonItem(title: "登录", style: UIBarButtonItemStyle.Plain, target: self, action: "loginButton")
    }
    
    func registerButtom()
    {
       print(__FUNCTION__)
    }
    func loginButton()
    {
        print(__FUNCTION__)
    }
    
    func loginBtnWillClick() {
        
        print(__FUNCTION__)
    }
    
    func regisiterBtnWillClick() {
        
        print(__FUNCTION__)
    }
    

}
